var http = require("http");
var url = require("url");

http.createServer(function(request,response){
    var pathname = url.parse(request.url).pathname;
    if( pathname === '/' ){
        response.writeHead(200,{
            'Content-type':"text/plain"
        });
        response.end("HOME PAGE")
    }else if( pathname === '/about' ){
        response.writeHead(200,{
            'Content-type':"text/plain"
        });
        response.end("ABOUT PAGE")
    }else if( pathname === '/contact' ){
        response.writeHead(200,{
            'Content-type':"text/plain"
        });
        response.end("CONTACT PAGE")
    }
}).listen(3000,'127.0.0.1')